package com.mkh.st.admin.api.feign;

import com.mkh.st.admin.api.entity.SysArea;
import com.mkh.st.common.core.constant.ServiceNameConstants;
import com.mkh.st.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author st
 * @date 2020/5/12
 * <p>
 * 查询参数相关
 */
@FeignClient(contextId = "paramProvider", value = ServiceNameConstants.UPMS_SERVICE,url ="${st.adminUrl:}")
public interface IParamProvider {

	/**
	 * 通过key 查询参数配置
	 * @param key key
	 * @return
	 */
	@GetMapping("/param/provider/publicValue/{key}")
	R<String> getByKey(@PathVariable("key") String key);

	/**
	 * 流水号
	 * @param code
	 * @return
	 */
	@GetMapping("/param/provider/getSequenceCode")
	R<String> getSequenceCode(@RequestParam("code") String code);

	@GetMapping("/param/provider/getSysArea")
	R<SysArea> getSysArea(@RequestParam("cityCode") Long cityCode);
}
